package com.AbstractAndInterface.entity;

/**
 * Animal
 *
 * @author byc
 * @date 2022-02-05
 * 有抽象方法的类 必须被声明成抽象类
 * 抽象类不能被直接构造
 */
public abstract class Animal {

    //子类被构造时 要先构造父类
    protected String name = "卢本伟";

    public Animal(){
        System.out.println(this.name + " is created...");
    }

    public abstract void eat();

}
